package com.raspbian.monitor.bean;

import com.raspbian.monitor.utils.PasswordUtil;
import lombok.Setter;
import lombok.ToString;

@Setter
@ToString
public class ChangePasswordReq {
    private String userName;
    private String originPassword;
    private String newPassword;

    public String getUserName() {
        return userName;
    }

    public String getOriginPassword() {
        PasswordUtil passwordUtil = new PasswordUtil(originPassword.trim());
        return passwordUtil.getEncryptedPwd();
    }

    public String getNewPassword() {
        PasswordUtil passwordUtil = new PasswordUtil(newPassword.trim());
        return passwordUtil.getEncryptedPwd();
    }
}
